from presenter import basepresenter

class AdminDiscussionPresenter(basepresenter.BasePresenter):

    def respondToGet(self):      

        self.template_values['discussiontypelist'] = []
        #get the discussions for each type
        for discussiontype in self.navdiscussiontypes:
            discussions = self.discussiontask.getDiscussionByType(discussiontype)
            self.template_values['discussiontypelist'].append(discussions)

        # set up the page title
        page_title = self.sitetitle + ' - Discussion Admin'
        self.template_values['page_title'] = page_title

        #get the view to draw the page
        self.view.showGetResponse(self.template_values)